{% extends "homepage.html" %}

{% block content %}

<form>
<input type="hidden" name="start" value="{{info.start}}"/>
<input type="hidden" name="paging" value="0"/>
<table border="0">

<tr>
<td align=left> 
{{KNOWL('lf.degree',title='Degree')}}:</td><td align=left> <input type='text' name='n' size=3 value="{{info.n}}">
</td>
<td align=left> 
{{KNOWL('lf.discriminant_exponent',title='Discriminant exponent')}} $c$:
<td align=left> <input type="text" name="c" size="3" value="{{info.c}}" >

<td align=left> 
{{KNOWL('nf.galois_group',title='Galois group')}}:
<td align=left> <input type="text" name="gal" size="8" value="{{info.gal}}" >

</tr>
<tr>
<td align=left> 
Prime $p$:</td><td align=left> <input type="text" name="p" size="3" value="{{info.p}}" ></td>
</td>
<td align=left> 
{{KNOWL('lf.ramification_index',title='Ramification index')}} $e$:
<td align=left> 
<input type="text" name="e" size="3" value="{{info.e}}" >
</tr>

<tr>
<td align='left' colspan='4'>Maximum number of fields to display: <input type='text' name='count' value="{{info.count}}" size='10'>
</td>
</tr>

<tr>
<td align=left colspan="2"> 
<button type='submit' value='refine'>Search again</button>
</td></tr>
</table>
</form>

{% if info.err is defined %}

{% if info.label is defined %}
<form>
<table border=0 cellpadding=5>
<tr>
<td>Field:&nbsp;&nbsp;</td>
<td ><input type='text' name='jump_to' size=60 value="{{info.label}}"> </td>
<td><button type='submit' value='Find'>Find</button></td>
</tr>
<tr>
<td colspan="3" rowspan="2"><span class="formexample"> a field label, e.g. 2.4.6.7</span></td>
</tr>
</table>
</form>

{% endif %}

<h2>Error</h2>
<div>
  {{ info.err|safe }}
  <p>
  Either modify your search above or go <input type=button value="Back" onClick="history.go(-1)">
</div>
{% else %}


<h2> Results: ({{info.report}}) </h2>

{% if info.number > 0 %}

<table border=1 cellpadding=5 class="ntdata">
<thead>
<tr>
<th>Polynomial</th>
<th>$p$</th>
<th>$e$</th>
<th>$f$</th>
<th>$c$</th>
<th>Galois group</th>
</tr>
</thead>
<tbody>

{% for field in info.fields: %}
<tr>
<td align='left'><a href="/LocalNumberField/{{field.label}}">{{info.display_poly(field.coeffs)|safe}}</a></td>
<td>{{field.p}}</td>
<td>{{field.e}}</td>
<td>{{field.f}}</td>
<td>{{field.c}}</td>
<td>{{info.group_display(field.gal)}}</td>
</tr>

{% endfor %}

</tbody>
</table>
<br>
<a href="#" class="navlink" onclick="decrease_start_by_count_and_submit_form();return false">Previous</A>
<a href="#" class="navlink" onclick="increase_start_by_count_and_submit_form();return false">Next</A></td>

{% endif %}
{% endif %}



{% endblock %}
